package com.example.xd.defaultcall.test;

import android.os.Build;

/**
 * @auther XuDan on 2020/6/29.
 */
public class SdkVersionOverride {

    /** Flag used to determine if override sdk versions are returned. */
    private static final boolean ALLOW_OVERRIDE_VERSION = false;

    private SdkVersionOverride() {}

    /**
     * Gets the sdk version
     *
     * @param overrideVersion the version to attempt using
     * @return overrideVersion if the {@link #ALLOW_OVERRIDE_VERSION} flag is set to {@code true},
     *     otherwise the current version
     */
    public static int getSdkVersion(int overrideVersion) {
        return ALLOW_OVERRIDE_VERSION ? overrideVersion : Build.VERSION.SDK_INT;
    }
}
